package com.ofek.applicationbase.forms.question;

import java.lang.reflect.Field;

import android.content.Context;

public class DatePickerDialog extends android.app.DatePickerDialog{

	public DatePickerDialog(Context context, int theme,
			OnDateSetListener callBack, int year, int monthOfYear,
			int dayOfMonth) {
		super(context, theme, callBack, year, monthOfYear, dayOfMonth);
	}
	public DatePickerDialog(Context context,
			OnDateSetListener callBack, int year, int monthOfYear,
			int dayOfMonth) {
		this(context, 0, callBack, year, monthOfYear, dayOfMonth);
	}
	public void setOnDateSetListener(OnDateSetListener mDateSetListener) {
		Field declaredField;
		try {
			declaredField = android.app.DatePickerDialog.class.getDeclaredField("mCallBack");
			declaredField.setAccessible(true);
			declaredField.set(this, mDateSetListener);
		} catch(Exception e) {
			e.printStackTrace();
			throw new RuntimeException(e);
		}
		
	}
}
